

speed=$1
buffer=$2


file1=laptop_en0_${speed}_${buffer}.pcap
file2=vm_enp0s5_${speed}_${buffer}.pcap
file3=vm_wlx8416f9171bbc_${speed}_${buffer}.pcap
file4=hombre_enp4s0_${speed}_${buffer}.pcap

tshark -r ${file1} -T fields -e ip.dst -e data -E header=y -E separator=, -E quote=d -E occurrence=f > ${file1}.csv
tshark -r ${file2} -T fields -e ip.dst -e data -E header=y -E separator=, -E quote=d -E occurrence=f > ${file2}.csv
tshark -r ${file3} -T fields -e ip.dst -e data -E header=y -E separator=, -E quote=d -E occurrence=f > ${file3}.csv
tshark -r ${file4} -T fields -e ip.dst -e data -E header=y -E separator=, -E quote=d -E occurrence=f > ${file4}.csv


python3 compress_tcpdump.py ${file1}.csv
python3 compress_tcpdump.py ${file2}.csv
python3 compress_tcpdump.py ${file3}.csv
python3 compress_tcpdump.py ${file4}.csv

rm ${file1}.csv
rm ${file2}.csv
rm ${file3}.csv
rm ${file4}.csv
